package model.po;

import javax.persistence.*;
import java.util.Date;

/**
 * @author winkyle
 * @date 2018/06/22
 * @description 消息信息实体类
 */
@Entity
public class MessageInfo {
	
	/**
	 * 消息Id
	 */
	@Id
	@Column(name="pk_message_id",length=16,nullable=false,updatable=false,insertable=true,unique=true)
	private String messageId;
	
    /**
     * 消息标题
     */
	@Column(length=16,nullable=false)
    private String title;

    /**
     * 消息内容
     */
	@Column(length=50,nullable=false)
    private String content;

    /**
     * 消息图片地址
     */
	@Column(length=50)
    private String imageUrl;

    /**
     * 消息网页描述
     */
	@Column(length=15)
    private String description;

    /**
     * 消息链接
     */
	@Column(length=100)
    private String linkAddress;
    
	/**
	 * 外键，用户Id
	 */
	@Column(length=16,nullable=false,updatable=false,insertable=true)
	private String userId;
	
	/**
	 * 创建时间
	 */
	@Column(updatable = false)  
    @org.hibernate.annotations.CreationTimestamp  
    @Temporal(TemporalType.TIMESTAMP) 
	private Date createTime;
	
	/**
	 * 更新时间
	 */
	@Column(updatable = true) 
	@org.hibernate.annotations.UpdateTimestamp  
	@Temporal(TemporalType.TIMESTAMP) 
	private Date updateTime;

	public String getMessageId() {
		return messageId;
	}

	public void setMessageId(String messageId) {
		this.messageId = messageId;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getImageUrl() {
		return imageUrl;
	}

	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getLinkAddress() {
		return linkAddress;
	}

	public void setLinkAddress(String linkAddress) {
		this.linkAddress = linkAddress;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

}
